package cn.afterturn.easypoi.word.entity.bookmark;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
/*@Data
@ToString(callSuper = true)
@EqualsAndHashCode()*/
@Entity
@Table(name = "footEntityVO", schema = "jeecg-boot-sjk", catalog = "")
public class FootEntityVO {
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getDocumentSequence() {
        return documentSequence;
    }

    public void setDocumentSequence(int documentSequence) {
        this.documentSequence = documentSequence;
    }

    public String getFooterText() {
        return footerText;
    }

    public void setFooterText(String footerText) {
        this.footerText = footerText;
    }

    public Set<ParagraphEntityVO> getParagraphEntityVOS() {
        return paragraphEntityVOS;
    }

    public void setParagraphEntityVOS(Set<ParagraphEntityVO> paragraphEntityVOS) {
        this.paragraphEntityVOS = paragraphEntityVOS;
    }

    public Set<BookMarkEntityVO> getBookMarkEntityVOS() {
        return bookMarkEntityVOS;
    }

    public void setBookMarkEntityVOS(Set<BookMarkEntityVO> bookMarkEntityVOS) {
        this.bookMarkEntityVOS = bookMarkEntityVOS;
    }

    public WordEntityVO getWordEntityVO() {
        return wordEntityVO;
    }

    public void setWordEntityVO(WordEntityVO wordEntityVO) {
        this.wordEntityVO = wordEntityVO;
    }

    @Id

    @Column(name = "id")
    private String id;
    private int documentSequence=4;//输出的时候，对WordEntity进行排序Footer最后面，暂时没有用到
    private String footerText;
    @JsonIgnoreProperties("footEntityVO")
    @OneToMany(mappedBy = "footEntityVO",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
    private Set<ParagraphEntityVO> paragraphEntityVOS=new HashSet<>();
    @JsonIgnore
    @Transient
    private Set<BookMarkEntityVO> bookMarkEntityVOS;//这个应该不需要转为客户端填写

    @JsonIgnoreProperties("footEntityVOS")
    @ManyToOne(cascade = CascadeType.ALL,optional = false,fetch = FetchType.LAZY)
    @JoinColumn(name = "fid"/*,foreignKey = @ForeignKey(name = "none",value = ConstraintMode.NO_CONSTRAINT)*/)
    private WordEntityVO wordEntityVO;

}
